<?php

namespace App\Events\Plane\PlaneOrder\Refund;

use App\Models\Plane\PlaneOrders\PlaneOrderReturnApply;
use App\Trip\Plane\Providers\BookOf51\Result\Notify\TicketReturnFailed;
use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

class PlaneOrderTicketReturnFailedEvent
{
    use Dispatchable, InteractsWithSockets, SerializesModels;

    public PlaneOrderReturnApply $return;
    public TicketReturnFailed    $notify;

    /**
     * Create a new event instance.
     *
     * @return void
     */
    public function __construct(PlaneOrderReturnApply $return, TicketReturnFailed $notify)
    {
        $this->return = $return;
        $this->notify = $notify;
    }

    /**
     * Get the channels the event should broadcast on.
     *
     * @return Channel|array
     */
    public function broadcastOn()
    {
        return new PrivateChannel('channel-name');
    }
}
